package com.yanqu.road.logic.activity.foxcard.game.buff;

import com.yanqu.road.entity.activity.foxcard.FoxConsumeCard;
import com.yanqu.road.entity.activity.foxcard.FoxEffectCard;
import com.yanqu.road.logic.activity.foxcard.game.FoxCardGameLogic;
import com.yanqu.road.logic.activity.foxcard.game.eFoxCardTriggerType;

/**
 * 负片效果 栏位+1
 */
public class FoxCardBuff8 extends FoxCardBuffBase {
    @Override
    protected boolean buffHandle(FoxCardGameLogic gameLogic) {
        if (triggerType == eFoxCardTriggerType.ADD) {
            if (baseCard instanceof FoxEffectCard) {
                gameLogic.getGameData().setEffectCardNumLimit(gameLogic.getGameData().getEffectCardNumLimit() + 1);
                return true;
            } else if (baseCard instanceof FoxConsumeCard) {
                gameLogic.getGameData().setConsumeCardNumLimit(gameLogic.getGameData().getConsumeCardNumLimit() + 1);
                return true;
            }
        } else if (triggerType == eFoxCardTriggerType.REMOVE) {
            if (baseCard instanceof FoxEffectCard) {
                gameLogic.getGameData().setEffectCardNumLimit(gameLogic.getGameData().getEffectCardNumLimit() - 1);
                return true;
            } else if (baseCard instanceof FoxConsumeCard) {
                gameLogic.getGameData().setConsumeCardNumLimit(gameLogic.getGameData().getConsumeCardNumLimit() - 1);
                return true;
            }
        }
        return false;

    }
}
